package com.zhentao.controller;

import com.zhentao.pojo.Appointment;
import com.zhentao.service.AppointmentService;
import com.zhentao.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/Appointment")
public class AppointmentController {
    @Autowired
    private AppointmentService appointmentService;
    @PostMapping("/add")
    public Result addAppointment(@RequestBody Appointment appointment) {
        // 这里可以添加具体的业务逻辑来处理预约的添加操作
        appointmentService.add(appointment);
        return Result.OK();
    }


}
